<?php namespace Zmsun\Http\Header;class UserAgent implements IHeader{public static function fromString($headerLine){$header=new static();list($name,$value)=GenericHeader::splitHeaderLine($headerLine);if(str_replace(array('_',' ','.'),'-',strtolower($name))!=='user-agent'){throw new \InvalidArgumentException('Invalid header line for User-Agent string: "'.$name.'"');}$header->value=$value;return$header;}public function getFieldName(){return'User-Agent';}public function getFieldValue(){return$this->value;}public function toString(){return'User-Agent: '.$this->getFieldValue();}}